const { formatPrice } = require('./formatNum')

const formatGoodsPrice = (list) => {
  return list.map(item => {
    const newPrice = formatPrice(item.newPrice)
    const initialPrice = formatPrice(item.initialPrice)
    return Object.assign({}, {...item}, {newPrice, initialPrice})
  })
}

module.exports = formatGoodsPrice

